import { LocalizationContext, MenuItem } from "../../core";

import { ZoomMenuItemProps } from "./interface";
import ZoomInIcon from "./ZoomInIcon";
import { FC, useContext } from "react";

const ZoomInMenuItem: FC<ZoomMenuItemProps> = ({ onClick }) => {
  const l10n = useContext(LocalizationContext);
  const label = l10n && l10n.zoom ? l10n.zoom.zoomIn : "Zoom in";

  return (
    <MenuItem icon={<ZoomInIcon />} onClick={onClick}>
      {label}
    </MenuItem>
  );
};

export default ZoomInMenuItem;
